<template>
	<view class="content">
		<!-- 通知栏、轮播图 -->
		<view class="notice-box">
			<uni-notice-bar show-icon scrollable
				text="uni-app 版正式发布，开发一次，同时发布iOS、Android、H5、微信小程序、支付宝小程序、百度小程序、头条小程序等7大平台。" />
		</view>
		
		<!-- 功能区：扫码签到-->
		<view class="function-box scanCode" @click="screenOrder()" hover-class="navigator-hover">
			<view class="function-describe">
				<view class="desc-title">订单扫码拍照</view>
				<view class="desc-detail">一键扫码拍照</view>
			</view>
			<image class="function-img" mode="widthFix" src="/static/images/take-picture.png"></image>			
			<uni-icons class="function-img2" type="forward" size="15" color="#0278FF" />
		</view> 
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		onLoad: function() {
			// #ifdef MP-WEIXIN 
			// #endif
		},
		methods: {
			// #ifdef MP-WEIXIN 
			screenOrder(){
				console.log('@@@@');
				wx.scanCode({
					success(res) {
						let qrCode = res.result						
						console.log(res)
						console.log('qrCode',qrCode)
					},
					fail(res) {
						console.log(res);
					}
				})
			}
			// #endif
		},
	}		
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	/* 通知栏 */
	.notice-box {
		/* background-color: #0278FF; */
		width: 92vw;
		height: 80rpx;
		margin-top: 30rpx;
		border-radius: 20rpx;
		overflow: hidden;
	}
	
	/* 功能 扫码签到 */
	.function-box{
		width: 92vw;
		height: 260rpx;
		background-color: #d6eeff;
		margin-top: 20rpx;
		border-radius: 20rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.function-describe{
		width: 350rpx;
		padding-left: 50rpx;
	}
	.desc-title{
		font-size: x-large;
	}
	.desc-detail{
		margin-top: 10rpx;
		color: #797979;
	}
	.function-img{
		margin-top: -20rpx;
		width: 250rpx;
	}
	.function-img2{
		padding-right: 20rpx;
	}
</style>